import "./assets/main.css"

import { createApp } from "vue"
import { createPinia } from "pinia"

import App from "./App.vue"
import router from "./router"
import duration from "dayjs/plugin/duration"
import customParseFormat from "dayjs/plugin/customParseFormat"
import "dayjs/locale/zh-cn"
import { locale, extend } from "dayjs"

extend(duration)
extend(customParseFormat)
locale("zh-cn")
const app = createApp(App)

app.use(createPinia())
app.use(router)
app.config.errorHandler = (err, instance, info) => {
	console.log("全局捕捉错误", err, "\n", "实例", instance, "\n", "信息", info)
}
app.config.warnHandler = (msg, instance, trace) => {
	console.log("全局捕捉警告", msg, "\n", "实例", instance, "\n", "追踪", trace)
}
app.mount("#app")
